package com.example.springboot.controller.aop;

import com.example.springboot.config.anotation.idempotentandantishake.Idempotent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:ChenZhangKun
 * @Date: 2024/12/11 21:54
 */
@Slf4j
@RestController
@RequestMapping(value = "/mi/deng")
public class IdempotentController {

    @GetMapping(value = "/test")
    @Idempotent(key = "#str")
    public String test(@RequestParam String str) {
        log.info("进入了：{}", str);
        return str;
    }

}
